import $axios from './index.js'

function userList(data = {}) {
  const url = '/user/list'
  return $axios.get(url, data)
}

function userAdd(data = {}) {
  const url = '/user/add'
  return $axios.post(url, data)
}

function userEdit(data = {}) {
  const url = '/user/edit'
  return $axios.post(url, data)
}

function userEditStatus(data = {}) {
  const url = '/user/editStatus'
  return $axios.post(url, data)
}

function userGroupList(data = {}) {
  const url = '/userGroup/list'
  return $axios.get(url, data)
}

function userGroupAdd(data = {}) {
  const url = '/userGroup/add'
  return $axios.post(url, data)
}

function userGroupEdit(data = {}) {
  const url = '/userGroup/edit'
  return $axios.post(url, data)
}

function userGroupDel(data = {}) {
  const url = '/userGroup/del'
  return $axios.post(url, data)
}

function userGradeList(data = {}) {
  const url = '/userGrade/list'
  return $axios.get(url, data)
}

function userGradeAdd(data = {}) {
  const url = '/userGrade/add'
  return $axios.post(url, data)
}

function userGradeEdit(data = {}) {
  const url = '/userGrade/edit'
  return $axios.post(url, data)
}

function userGradeDel(data = {}) {
  const url = '/userGrade/del'
  return $axios.post(url, data)
}

function userLoginLog(data = {}) {
  const url = '/userLogin/list'
  return $axios.get(url, data)
}

function delUserLoginLog(data = {}) {
  const url = '/userLogin/del'
  return $axios.post(url, data)
}

export default {
  userList,
  userAdd,
  userEdit,
  userEditStatus,
  userGroupList,
  userGroupAdd,
  userGroupEdit,
  userGroupDel,
  userGradeList,
  userGradeAdd,
  userGradeEdit,
  userGradeDel,
  userLoginLog,
  delUserLoginLog
}
